//
//  Source.swift
//
//
//  Created by S JZ on 2024/7/26.
//

import Foundation

public protocol CellSource {
    associatedtype D
    var cellType: (any Hashable)? { get set }
    var data: D? { get set }
    var indexPath: IndexPath { get set }
}

public protocol TableCellSource: CellSource {
    var cellHeight: CGFloat { get set }
}

public protocol CollectionCellSource: CellSource {
    var cellSize: CGSize { get set }
}

open class SectionSource: NSObject {
    open var section: Int = 0
    open var heardHeight: CGFloat = 0.01
    open var footerHeight: CGFloat = 0.01
    open var cellDataList: [any CellSource] = []
}

